package org.sn.spring.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.sn.spring.springboot.service.DemoService;

/**
 * springboot helloworld
 * 
 * @author snzigod@hotmail.com
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

	@Autowired
	private DemoService demoService;

	@ResponseBody
	@RequestMapping("/sayHello")
	String sayHello(String name) {
		return demoService.sayHello(name);
	}

}